package cc.magicjson.synthesis.decorator;



import cc.magicjson.synthesis.model.Order;

import java.math.BigDecimal;

/**
 * 订单折扣装饰器抽象基类，可以为订单添加各种折扣信息
 */
public abstract class OrderDiscountDecorator {
    protected Order order;

    public OrderDiscountDecorator(Order order) {
        this.order = order;
    }

    /**
     * 应用折扣
     * @return 应用折扣后的订单
     */
    public abstract Order applyDiscount();

    /**
     * 获取折扣描述
     * @return 折扣描述
     */
    public abstract String getDiscountDescription();

    /**
     * 获取折扣金额
     * @return 折扣金额
     */
    public abstract BigDecimal getDiscountAmount();
}
